package com.tyqx.service.Impl;

import com.tyqx.bean.model.StopBlockInterval;
import com.tyqx.mapper.EthPoolInfoMapper;
import com.tyqx.bean.model.EthPoolInfo;
import org.springframework.stereotype.Service;
import com.tyqx.service.EthPoolInfoService;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service("ethPoolInfoService")
public class EthPoolInfoServiceImpl implements EthPoolInfoService {

    @Resource
    private EthPoolInfoMapper ethPoolInfoMapper;

    @Override
    public Integer insert(EthPoolInfo ethPoolInfo) {
        return ethPoolInfoMapper.insert(ethPoolInfo);
    }

    @Override
    public Integer insertBatch(List<EthPoolInfo> ethPoolInfoList) {
        return ethPoolInfoMapper.insertBatch(ethPoolInfoList);
    }

    @Override
    public Integer selectEthInfoByBlockNum(Long blockNum) {
        return ethPoolInfoMapper.selectEthInfoByBlockNum(blockNum);
    }

    @Override
    public List<StopBlockInterval> selectStopBlockInterval() {
        return ethPoolInfoMapper.selectStopBlockInterval();
    }

    @Override
    public Long selectMaxBlock() {
        return ethPoolInfoMapper.selectMaxBlock();
    }

    @Override
    public List<EthPoolInfo> selectEthPoolInfoByStartDateToEndDate(Date startDate, Date endDate) {
        return ethPoolInfoMapper.selectEthPoolInfoByStartDateToEndDate(startDate,endDate);
    }

    @Override
    public List<Date> selectEthPoolInfoGroupByProductDate() {
        return ethPoolInfoMapper.selectEthPoolInfoGroupByProductDate();
    }

    @Override
    public List<EthPoolInfo> selectEthPoolInfoByCurrentDay(Date currentDay) {
        return ethPoolInfoMapper.selectEthPoolInfoByCurrentDay(currentDay);
    }
}
